from enum import IntEnum


class RegexpEnum:
    """正则表达式枚举，非正规枚举
    """
    words = r'^(?!\d+$)[\da-zA-Z_:]+$'


class RoleCodeEnum:
    """角色代码枚举，需要在数据库添加对于的角色代码
    """
    SUPER_ADMIN = 'super_admin'
    ADMIN = 'admin'
    GUEST = 'guest'
    INSPECTORS = 'inspectors'
    AUTHOR = 'author'


class PublishType(IntEnum):
    """文章发布类型"""
    draft = 1  # 草稿
    show = 2  # 显示


class IpFilterType(IntEnum):
    """ip过滤类型
    """
    black = 1
    white = 2


class AuthRoleStatus(IntEnum):
    """认证角色状态
    """
    enabled = 0
    disabled = 1


class AuthPermissionType(IntEnum):
    """认证权限类型"""
    action = 0
    menu = 1
    resources = 2
